home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / exampleCode / audio / DAT / commands.l < prev    next >
Encoding:
Lex Description  |  1994-08-02  |  962 b   |  41 lines

  1. %{
  2. #include "y.tab.h"
  3. extern int yylval;
  4. char last_string[81];
  5. %}
  6. %%
  7. quit        return(QUIT);
  8. leadin        return(LEADIN);
  9. leadout        return(LEADOUT);
  10. bot        return(BOT);
  11. eot        return(EOT);
  12. rate        return(RATE);
  13. prohibit    return(COPY);
  14. program        return(PROGRAM);
  15. index        return(INDEX);
  16. pause        return(PAUSE);
  17. silence        return(SILENCE);
  18. testpat        return(TESTPAT);
  19. write        return(FWRITE);
  20. read        return(FREAD);
  21. where        return(WHERE);
  22. readpos        return(WHERENOT);
  23. frames        return(FRAMES);
  24. readframe    return(READFRAME);
  25. seek        return(SEEK);
  26. [0-9]+        { yylval = atoi(yytext); return(INTEGER); }
  27. y        { yylval = 1; return(BOOLEAN); }
  28. yes        { yylval = 1; return(BOOLEAN); }
  29. n        { yylval = 0; return(BOOLEAN); }
  30. no        { yylval = 0; return(BOOLEAN); }
  31. pn        return(PROGNUM);
  32. at        return(ATIME);
  33. pt        return(PTIME);
  34. :        return(COLON);
  35. [a-zA-Z0-9_.!@#$%^&\*()+=~/<>]+    { 
  36.         strncpy(last_string, yytext, 80);
  37.         last_string[80] = 0;
  38.         return(STRING);
  39.     }
  40. #[a-zA-Z0-9_.,`|:;\?{}!@#$%^&\*()+=~/<> '"\-]*$    return(COMMENT);
  41.